package com.prototype.client.managed.ui;

import com.google.gwt.requestfactory.ui.client.ProxyRenderer;
import com.prototype.client.managed.request.GroupERPProxy;
import com.prototype.client.managed.request.UserERPProxy;

public class UserERPProxyRenderer extends ProxyRenderer<UserERPProxy> {

    private static com.prototype.client.managed.ui.UserERPProxyRenderer INSTANCE;

    protected UserERPProxyRenderer() {
        super(new String[] { "userName" });
    }

    public static com.prototype.client.managed.ui.UserERPProxyRenderer instance() {
        if (INSTANCE == null) {
            INSTANCE = new UserERPProxyRenderer();
        }
        return INSTANCE;
    }

    public String render(UserERPProxy object) {
        if (object == null) {
            return "";
        }
        return object.getUserName() + " (" + object.getId() + ")";
    }
}
